﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DataAnnotationsExtensions;
namespace SCS.Common.Models
{
    /// <summary>
    /// Status values returned when creating a user
    /// </summary>
    public enum MembershipCreateStatus
    {
        Success,
        DuplicateUserName,
        DuplicateEmail,
        InvalidPassword,
        InvalidEmail,
        InvalidAnswer,
        InvalidQuestion,
        InvalidUserName,
        ProviderError,
        UserRejected
    }

    public partial class MembershipUser
    {
        public MembershipUser()
        {
            this.Parents = new List<Parent>();
            this.PrivateMessages = new List<PrivateMessage>();
            this.PrivateMessages1 = new List<PrivateMessage>();
            this.Teachers = new List<Teacher>();
            this.MembershipRoles = new List<MembershipRole>();
        }

        public int userID { get; set; }
        [Required(ErrorMessage = "Trường không được để trống")]
        public string userName { get; set; }
        public string password { get; set; }
        public string passwordSalt { get; set; }
        [Required(ErrorMessage = "Trường không được để trống")]
        [Email]
        public string email { get; set; }
        public bool isLockedOut { get; set; }
        public System.DateTime createDate { get; set; }
        public System.DateTime lastPasswordChangedDate { get; set; }
        public Nullable<System.DateTime> expiryDate { get; set; }
        public virtual ICollection<Parent> Parents { get; set; }
        public virtual ICollection<PrivateMessage> PrivateMessages { get; set; }
        public virtual ICollection<PrivateMessage> PrivateMessages1 { get; set; }
        public virtual ICollection<Teacher> Teachers { get; set; }
        public virtual ICollection<MembershipRole> MembershipRoles { get; set; }

    }
}
